#!/bin/sh
dataline=""
if [ -f "/var/run/udhcpc.pid" ];then
	dataline=$(cat /var/run/udhcpc.pid)
fi
if [ $# -eq 2 ];then
	if [ $1 = "eth0" ];then
		echo -n "eth0 "
	fi
	if [ $2 = "up" ];then
		if [[ -n $dataline ]];then
    			kill -9  $dataline
		fi
                dhcpc_eth -b -i eth0 -p /var/run/udhcpc.pid -R &
	elif [ $2 = "down" ];then
		/sbin/ifconfig eth0 0.0.0.0 
		if [[ -n $dataline ]];then
                        kill -9  $dataline
                fi
			rm /var/run/udhcpc.pid -rf                           
	elif [ $2 = "disable" ];then
		echo "disable"
	elif [ $2 = "error" ];then
		echo "error"
	fi
fi
